<%@ page language="java" pageEncoding="UTF-8"%>
 <%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%
String path = request.getContextPath();
%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
	<head>
		<meta http-equiv="pragma" content="no-cache" />
		<meta http-equiv="cache-control" content="no-cache" />
		<meta http-equiv="expires" content="0" />
		<meta http-equiv="keywords" content="keyword1,keyword2,keyword3" />
		<meta http-equiv="description" content="This is my page" />

		<link rel="stylesheet" type="text/css" href="<%=path %>/css/base.css" />
		<script type="text/javascript" src="<%=path %>/js/popup.js"></script>
        <script language="javascript">

	    function teacherDel(id)
           {
               if(confirm('您确定删除吗？'))
               {
                   window.location.href="<%=path %>/teacherDel.action?id="+id;
               }
           }
           function updateTeaPwd(id)
           {
               if(confirm('您确定要重置密码为123456吗？'))
               {
                   window.location.href="<%=path %>/updateTeaPwd.action?id="+id;
               }
           }
           
           
           function teacherEditPre(id)
           {
                   window.location.href="<%=path %>/teacherEditPre.action?id="+id;
           }
           
           function teacherAdd()
           {
                 var url="<%=path %>/toteacherAdd.action";
                
		  window.location.href=url;
           }

   function teacherAudit(id,ty)
           {
                   window.location.href="<%=path%>/teacherAudit.action?id="+id + "&ty=" + ty;
           }

       </script>
	</head>

	<body leftmargin="2" topmargin="2" background='<%=path %>/images/allbg.gif'>
	
	<br/>
	<form action="<%=path%>/teacherList.action" method="post">
	   &nbsp; 姓名：  <input type="text" name="name" value="${name}"/>
					   
					   <input type="submit" value="查询"/>
	
	</form>
			<table width="98%" border="0" cellpadding="2" cellspacing="1" bgcolor="#D1DDAA" align="center" style="margin-top:8px">
				<tr bgcolor="#E7E7E7">
					<td height="14" colspan="11" background="<%=path %>/images/tbg.gif">&nbsp;老师信息管理&nbsp;</td>
				</tr>
				<tr align="center" bgcolor="#FAFAF1" height="22">
											<td>教师编号</td>
											<td>姓名</td>
											<td>性别</td>
											<td>学历</td>
											<td>电话</td>
											<td>用户名</td>
										 	
										 	<td>职称</td>
										 	<td>政治面貌</td>
										 	<td>身份证号</td>
										 	<td>籍贯</td>
										 	<td>所属院系</td>
										<td width="15%">操作</td>
		        </tr>	
				 
				 <c:forEach items="${teacherList}" var="teacher" varStatus="sta">
				<tr align='center' bgcolor="#FFFFFF" onMouseMove="javascript:this.bgColor='red';" onMouseOut="javascript:this.bgColor='#FFFFFF';" height="22">
											<td bgcolor="#FFFFFF" align="center">${teacher.id} </td>
											<td bgcolor="#FFFFFF" align="center">${teacher.name} </td>
											<td bgcolor="#FFFFFF" align="center">${teacher.sex} </td>
											<td bgcolor="#FFFFFF" align="center">${teacher.xueli} </td>
											<td bgcolor="#FFFFFF" align="center">${teacher.tel} </td>
										 
											<td bgcolor="#FFFFFF" align="center">${teacher.uname} </td>
											
											<td bgcolor="#FFFFFF" align="center">${teacher.level} </td>
											<td bgcolor="#FFFFFF" align="center">${teacher.face} </td>
											<td bgcolor="#FFFFFF" align="center">${teacher.idnumber} </td>
											<td bgcolor="#FFFFFF" align="center">${teacher.provice} </td>
											<td bgcolor="#FFFFFF" align="center">${teacher.orginazation} </td>
					<td bgcolor="#FFFFFF" align="center">
	 

                                                <input type="button" value="修改" onclick="teacherEditPre('${teacher.id}')"/>
						<input type="button" value="删除" onclick="teacherDel('${teacher.id}')"/>
					 
                            <input type="button" value="重置密码" onclick="updateTeaPwd('${teacher.id}')"/>
 
					</td>
				</tr>
				</c:forEach>
			</table>
			
			<table width='98%'  border='0'style="margin-top:8px;margin-left: 5px;">
			  <tr>
			    <td>
			        <input type="button" value="添加" style="width: 80px;" onclick="teacherAdd()" />
			    </td>
			  </tr>
		    </table>
		     
	</body>
</html>